package com.cn.distributeids;

import org.junit.Test;

/***
 * @author: hels
 * @description:
 * @date: 2022-9-19 15:28
 **/
public class TestP {

    @Test
    public void test2() {
    
        int a = 11;
        int b = 6;
        System.out.println("&： " + ( a & b));
        System.out.println("|： " + ( a | b));
        System.out.println("^： " + ( a ^ b));
    }

    @Test
    public void test1() {
        Integer i = 0;
        System.out.println(Integer.toBinaryString(i));
        Integer j = -1 ^ (-1 << 4);

        System.out.println(j);
        System.out.println(Integer.toBinaryString(j));
        System.out.println(Integer.toBinaryString(0));
        System.out.println(Integer.toBinaryString(-1));
        System.out.println(Integer.toBinaryString(-2));
        System.out.println(Integer.toBinaryString(-2147483648));
    }
}
